import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
const routes = [

    {
        path: '/',
        name: 'Main',
        component: () =>
            import ('../views/Main.vue'),
        children: [{
                path: 'Home',
                alias: "",
                name: 'Home',
                component: () =>
                    import ('../views/Home.vue'),
            },
            {
                path: 'Menu',
                name: 'Menu',
                component: () =>
                    import ('../views/Menu.vue'),
            },
            {
                path: 'Order',
                name: 'Order',
                component: () =>
                    import ('../views/Order.vue'),
            },
            {
                path: 'Mine',
                name: 'Mine',
                component: () =>
                    import ('../views/Mine.vue'),
            },
        ]
    },
    {
        path: '/Search',
        name: 'Search',
        component: () =>
            import ('../views/Search.vue'),
    },
    {
        path: '/Login',
        name: 'Login',
        component: () =>
            import ('../views/Login.vue'),
    },
    {
        path: '/Detail',
        name: 'Detail',
        component: () =>
            import ('../views/Detail.vue'),
    },
    {
        path: '/Review/:pid',
        name: 'Review',
        component: () =>
            import ('../views/Review.vue'),
    },
    {
        path: '/Bag',
        name: 'Bag',
        component: () =>
            import ('../views/Bag.vue'),
    },
    {
        path: '/pay',
        name: 'pay',
        component: () =>
            import ('../views/pay.vue'),
    },
    {
        path: '/Editaddress',
        name: 'Editaddress',
        component: () =>
            import ('../views/Editaddress.vue'),
    },
    {
        path: '/AddressList',
        name: 'AddressList',
        component: () =>
            import ('../views/AddressList.vue'),
    },
    {
        path: '/Userinfo',
        name: 'Userinfo',
        component: () =>
            import ('../views/Userinfo.vue'),
    },
    {
        path: '/Alllike',
        name: 'Alllike',
        component: () =>
            import ('../views/Alllike.vue'),
    },
    {
        path: '/Email',
        name: 'Email',
        component: () =>
            import ('../views/Email.vue'),
    },
    {
        path: '/Newpassword',
        name: 'Newpassword',
        component: () =>
            import ('../views/Newpassword.vue'),
    },
    {
        path: '/Security',
        name: 'Security',
        component: () =>
            import ('../views/Security.vue'),
    },
    {
        path: '/demo',
        name: 'demo',
        component: () =>
            import ('../views/demo.vue'),
    },



]

const router = new VueRouter({
    routes
})

export default router